﻿#nullable enable

using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace PHMEE.EnergyEfficiency;

public interface IBunkerReportAppService
{
    /// <summary>
    /// 检查加油量报告的时间戳是否已经存在
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<CheckTsExistDto> CheckTsExistAsync(Guid vesselId, CreateUpdateBunkerReportDto input);

    /// <summary>
    /// 获取加油量报告详情
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="ts"></param>
    /// <returns></returns>
    Task<BunkerReportDto?> GetDetailAsync(Guid vesselId, DateTime ts);

    /// <summary>
    /// 录入加油量报告
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="input"></param>
    Task CreateAsync(Guid vesselId, CreateUpdateBunkerReportDto input);

    /// <summary>
    /// 更新加油量报告
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="ts">旧报告的 Ts</param>
    /// <param name="input">新报告</param>
    Task UpdateAsync(Guid vesselId, DateTime ts, CreateUpdateBunkerReportDto input);

    /// <summary>
    /// 删除加油量报告
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="ts"></param>
    Task DeleteAsync(Guid vesselId, DateTime ts);

    /// <summary>
    /// 分页查询加油量报告
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<PagedResultDto<BunkerReportDto>> GetListAsync(Guid vesselId, PagedAndSortedWithTimeRangeResultRequestDto input);
}